

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://celepar.pr.gov.br/taglibs/html-2.0" prefix="grid"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!-- <jsp:useBean id="agora" class="java.util.Date" /> -->

<html:form action="/usuariosSistemaReport.do">
<html:hidden property="acao" value=""/>
<div id="conteudo_corpo">
	<h2>Selecione o sistema</h2>
	<table class="form_tabela" cellspacing="0">
		<tr>
			<td class="form_label">Sistema</td>
			<td>
				<html:select property="codSistema" onchange="javascript:AoSelecionarSistema();">
					<html:option value="">Selecione um Sistema</html:option>
					<html:options collection="listaSistemas" property="codSistema" labelProperty="nome" />
				</html:select>
			</td>
		</tr>
		
		
	</table>
	<hr />
	<div align="center">
		<html:button property="" value="Tela Principal" styleClass="form_botao" onclick="javascript:AoClicarPrincipal();"/>
	</div>
</div>

<c:if test="${!empty pagina}">
     	<div id="conteudo_corpo">
		<grid:table  classLinha1="list_cor_sim" classLinha2="list_cor_nao">
			<grid:lista bean="${pagina}" atributoId="codUsuario" />
			<grid:campo atributo="nome" label="Nome"  align="left" />
			<grid:campo atributo="login" label="Login"  align="left" />
			<grid:campo atributo="email" label="Email" align="left" />
			<grid:campo atributo="dataCadastro" label="Data Cadastro" decorator="gov.pr.celepar.framework.taglib.grid.decorator.Data"/>
			<grid:campo atributo="ativo" label="Ativo" decorator="gov.pr.celepar.sentinela.util.BooleanDecorator"/>
	    	<grid:campo atributo="bloqueado" label="Bloqueado" decorator="gov.pr.celepar.sentinela.util.BooleanDecorator"/>
	   	</grid:table>
	</div>
   	</c:if>

<script language="javascript" type="text/javascript">
	function AoSelecionarSistema(){
		frm = document.forms[0];
		if(frm){
			frm.action="usuariosSistemaReport.do";
			frm.acao.value="pesquisar";
			frm.submit();
		}
	}
	
	function AoClicarPrincipal(){
		frm = document.forms[0];
		if(frm){
			frm.action="principal.do";
			frm.submit();
		}
	}
</script>


</html:form>
